/**
 * User: zhangbin
 * Date: 2014/7/29 9:41
 * Function:
 */
import com.bin.in.manager.InfoMybatisManager;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {
		"classpath:applicationContext.xml",
		"classpath:applicationContext-mybatis.xml",
		"classpath:applicationContext-tx.xml",
		"classpath:applicationContext-jms.xml"
})
public class StartJTAWithMybatis {
	@Resource
	private InfoMybatisManager manager;
	@Test
	public void test1(){
		try {
			manager.createInfo();
		} catch (Exception e) {
			System.out.println(e.getClass());
			System.out.print("发生异常了");
			//e.printStackTrace();
		}
		/*try {
			Thread.sleep(1000*60);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}*/
	}
	@Test
	public void test2(){
		manager.bothCreate();
	}
}
